package com.zeny.online.common;

/**
 * 响应信息
 *
 * @author zeny
 * @description
 */
public enum ResultCode {
    SUCCESS(20000, "操作成功", true),
    ERROR(20001, "操作失败", false),
    EXCEPTION(20002, "程序出现了异常", false),
    AUTH(30000, "没有操作权限", false);
    /**
     * 状态码
     */
    private Integer code;
    /**
     * 状态信息
     */
    private String message;
    /**
     * 是否成功
     */
    private Boolean success;

    ResultCode(Integer code, String message, Boolean success) {
        this.code = code;
        this.message = message;
        this.success = success;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public Boolean getSuccess() {
        return success;
    }
}
